package com.ytjj.qmyx.mall.mapper;

import com.ytjj.qmyx.mall.model.PlatformStrictProfit;
import com.ytjj.qmyx.mall.model.PlatformStrictProfitExample;

import java.util.Date;
import java.util.List;

import com.ytjj.qmyx.mall.model.UsersBalanceRecordStatistics;
import org.apache.ibatis.annotations.Param;

public interface PlatformStrictProfitMapper {
    long countByExample(PlatformStrictProfitExample example);

    int deleteByExample(PlatformStrictProfitExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(PlatformStrictProfit record);

    int insertSelective(PlatformStrictProfit record);

    List<PlatformStrictProfit> selectByExample(PlatformStrictProfitExample example);

    PlatformStrictProfit selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") PlatformStrictProfit record, @Param("example") PlatformStrictProfitExample example);

    int updateByExample(@Param("record") PlatformStrictProfit record, @Param("example") PlatformStrictProfitExample example);

    int updateByPrimaryKeySelective(PlatformStrictProfit record);

    int updateByPrimaryKey(PlatformStrictProfit record);

    PlatformStrictProfit selectByUserId(Integer userId);

    List<UsersBalanceRecordStatistics> getUsersBalanceRecordWeekStaticstics(Integer userId, int weeks);

    List<UsersBalanceRecordStatistics> getUsersBalanceRecordMonthStaticstics(Integer userId);

    List<UsersBalanceRecordStatistics> selectAllUsersWeekDynamicIncome(Integer weeks);

    List<UsersBalanceRecordStatistics> selectAllUsersMonthDynamicIncome(Integer months);

    UsersBalanceRecordStatistics getUserBalanceSumByUserIdAndTime(Integer userId, Date startTime, Date endTime);

    UsersBalanceRecordStatistics selectAllUsersHistoryDynamicIncome(Integer userId);
}